package com.xzy.service.impl;

import com.xzy.dao.ProjectMapper;
import com.xzy.entity.Project;
import com.xzy.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProjectServiceImpl  implements ProjectService {
    @Autowired
    private ProjectMapper projectMapper;
    @Override
    public void addProject(Project project) {
      projectMapper.addProject(project);
    }

    @Override
    public Project getProject(int projectId) {
        return projectMapper.getProject(projectId);
    }

    @Override
    public List<Project> findAll() {
        return projectMapper.findAll();
    }

    @Override
    public void deleteProject(int projectId) {
        projectMapper.deleteProject(projectId);
    }

    @Override
    public void updateProject(Project project) {
            projectMapper.updateProject(project);
    }
}
